package com.me.springcloud.retrofit;

import com.google.gson.annotations.SerializedName;

public class BaseEntity<E> {

	@SerializedName("code")
	private String code;
	@SerializedName("message")
	private String message;
	@SerializedName("data")
	private E data;

	public boolean isSuccess() {
		return code.equals(0);
	}

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public String getMessage() {
		return message;
	}

	public void setMessage(String message) {
		this.message = message;
	}

	public E getData() {
		return data;
	}

	public void setData(E data) {
		this.data = data;
	}
}